package com.azzcs.rocketmq.service.controller;

import com.azzcs.rocketmq.service.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wzg
 * @Date: 2021/4/28 上午7:50
 */
@RestController
@RequestMapping("phone")
public class PhoneController {

    @Autowired
    private PhoneService phoneService;

    @GetMapping("snapUp/{userId}")
    public String snapUp(@PathVariable("userId")String userId){
        return phoneService.snapUp(userId);
    }

    @GetMapping("onSale/{num}")
    public String onSale(@PathVariable("num")Integer num){
        return phoneService.onSale(num);
    }

}
